import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:waimai_flutter_app/constants.dart';

class MainBackground extends StatelessWidget {
  const MainBackground();
  @override
  Widget build(BuildContext context) {
    return SizedOverflowBox(
      size: Size(MediaQuery.of(context).size.width,
          MediaQuery.of(context).padding.top + flexibleBarHeight + 42),
      alignment: Alignment.topCenter,
      child: Container(
        width: MediaQuery.of(context).size.width,
        height: 270,
        child: CachedNetworkImage(
          imageUrl: urlMainBg,
          alignment: Alignment.bottomCenter,
          fit: BoxFit.fitWidth,
        ),
      ),
    );
  }
}
